﻿using Comm.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Comm.Web.View
{
    public partial class getBackPwd :Basepage
    {
        StringBuilder sb = new StringBuilder();
        BLL.MiBaoService bllmibao = new BLL.MiBaoService();
        BLL.MBQuestionService bllmbquestion = new BLL.MBQuestionService();
        protected string strHtml = string.Empty;
        public override void SonLoad()
        {
            if (!IsPostBack) 
            {
                getMiBao();
            }

        }
        public void getMiBao() 
        {
                string optHtml = string.Empty;
                IList<MiBao> mibao = bllmibao.getAllMiBao(UserNow.uId);
                IList<MBQuestion> list = bllmbquestion.getMBquestion();
                foreach (MBQuestion model in list)
                {
                    optHtml += "<option value=" + model.Id + ">" + model.QuestionM + "</option>";
                }
                sb.Append("<iframe name=\"myiframe1\" width=\"0\" height=\"0\" scrolling=\"no\"></iframe>");
                sb.Append("<div id=\"fSInfoMobao\" target=\"myiframe1\" style=\"margin:0 30%;\"><div style=\"text-align:center; margin-top:30px;\">");
                sb.Append("<h2 style=\"font-size:16px; text-align:center;\">用户" + UserNow.uLoginName + "正在比对密保</h2>");
                sb.Append("<div style=\"margin-top:50px;\">");
                sb.Append("<div><span>密保问题一：</span><select type=\"text\" id=\"MiBao1\" name=\"MiBao1\" style=\"width:300px;\">" + optHtml + "</select><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\"/></div>");
                sb.Append("<div><span>密保答案：</span><input type=\"text\" id=\"Question1\" name=\"Question1\" style=\"width:288px; margin-left:12px;\" size=\"50\" /><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\" /></div>");
                sb.Append("<div><span>密保问题二：</span><select type=\"text\" id=\"MiBao2\" name=\"MiBao2\" style=\"width:300px;\">" + optHtml + "</select><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\"/></div>");
                sb.Append("<div><span>密保答案：</span><input type=\"text\" id=\"Question2\" name=\"Question2\" style=\"width:288px; margin-left:12px;\" size=\"50\" /><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\" /></div>");
                sb.Append("<div><span>密保问题三：</span><select type=\"text\" id=\"MiBao3\" name=\"MiBao3\" style=\"width:300px;\">" + optHtml + "</select><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\"/></div>");
                sb.Append("<div><span>密保答案：</span><input type=\"text\" id=\"Question3\" name=\"Question3\" style=\"width:288px; margin-left:12px;\" size=\"50\"/><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\" /></div></div>");
                sb.Append("<input class=\"button button-primary button-rounded button-small\" style=\"background-color:#524F48;width:187px;margin-top:10px; height: 25px; margin-left:60px;line-height: 25px; border: 0px;\" type=\"submit\" id=\"btnNext\" value=\"下一步\"/>");
                sb.Append("</div></div>");
                sb.Append("<div id=\"fSUpdatePwd\" target=\"myiframe1\" style=\"margin:0 30%;\"><div style=\"text-align:center; margin-top:30px;\">");
                sb.Append("<h2 style=\"font-size:16px; text-align:center;\">用户" + UserNow.uLoginName + "正在重置密码</h2>");
                sb.Append("<div style=\"margin-top:50px;\">");
                sb.Append("<div><span>密码：</span><input  id=\"Txtpwd\" name=\"Txtpwd\" type=\"password\" style=\"width:288px; margin-left:40px;\" size=\"50\" /><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\" /></div>");
                sb.Append("<div><span>重复密码：</span><input id=\"TxtCpwd\" name=\"TxtCpwd\" type=\"password\" style=\"width:288px; margin-left:12px;\" size=\"50\" /><img  src=\"../images/cha.ico\" style=\"display:none\"  width=\"15\" height=\"15\" /></div></div>");
                sb.Append("<input class=\"button button-primary button-rounded button-small\" style=\"background-color:#524F48;width:100px;margin-top:10px; height: 25px; margin-left:70px;line-height: 25px; border: 0px;\" type=\"submit\" id=\"btnPrv\" value=\"上一步\"/>");
                sb.Append("<input class=\"button button-primary button-rounded button-small\" style=\"background-color:#524F48;width:100px;margin-top:10px; height: 25px; margin-left:30px;line-height: 25px; border: 0px;\" type=\"submit\" id=\"btnNext1\" value=\"下一步\"/>");
                sb.Append("</div></div>");
                strHtml = sb.ToString();
        }

    }
}